package com.example.testerclientapp;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class StartpageActivity extends Activity {
	Button visitor2,student1;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_startpage);
		
	        
     student1=(Button)findViewById(R.id.student);
     visitor2 = (Button)findViewById(R.id.visitor1);
     
     
     visitor2.setOnClickListener(new View.OnClickListener() {
     	@Override
         public void onClick(View v) 
     	{
     		
     		
     		Intent in = new Intent(StartpageActivity.this, ReservationSpotActivity.class);
      		 startActivity(in);
   		
     		
     		
          }
     });
     
     
     
     //OR
     ////////////////////BUTTON STUDENT/STAFF EVENT //////////////////////////////
     
     student1.setOnClickListener(new View.OnClickListener() {
     	@Override
         public void onClick(View v) 
     	{
		   
     		Intent in = new Intent(StartpageActivity.this, MainActivity.class);
   		 startActivity(in);
		
     	}	
	});
	} //end oncreate
     
     
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.startpage, menu);
		return true;
	}

}
